In efforts to reduce aliasing effects (e.g., jagged lines following boundaries between pixels) in rendering a two-dimensional (2D) image of three-dimensional (3D) object(s), various techniques of super-sampling anti-aliasing (SSAA) have been devised in which the 2D image is first created within a sampling data at a finer resolution than the final 2D image that is later created from that sampling data. Typically, in SSAA, a selected number of samples per pixel of the final 2D image is selected (often 2, 4, 8 or 16), and that number of samples is taken of the 3D object(s) for each pixel from the perspective of each of those pixels within the image plane of the final 2D image. Each sample specifies a color associated with the pixel to which that sample belongs, and the various colors of the samples of each pixel are employed to derive the colors given to each pixel in the final 2D image.
Unfortunately, SSAA is demanding of both memory and processor bandwidth since an entirely separate color data value is always stored for each sample, regardless of whether or not there are regions of one or more pixels in which all of the samples are the same color. In effect, at least in terms of the storage of color data values, the samples in super-sampling are essentially treated as if each were a miniature pixel. In applications where the rendering of 2D images must be done in real time at a rate high enough to support motion video (e.g., the imagery of scenery and characters in a video game), such treatment of samples requires all too costly amounts of processor and memory bandwidth.
In an effort to gain the benefits of sampling at a finer resolution without such high bandwidth requirements, various techniques of multi-sampling anti-aliasing (MSAA) were devised in which separate color data values can be stored for each sample within a pixel, but where it is also possible to store only one color data value for multiple samples in situations where more than one sample has the same color. In effect, this is a form of compression of the color data that takes advantage of situations where a pixel falls within a region of the final 2D image in which there is no transition in color (e.g., no edge) within that pixel such that all of its samples are the same color. In such situations, a single color value is stored only once for all of that pixel's samples. Only in situations where a pixel falls within a region in which there are one or more transitions of color (e.g., crossing an edge) within that pixel such that there are at least two different colors among its samples is the storage of more than one color data value necessary for that pixel's samples.
Unfortunately, despite these efficiencies in storage in MSAA, a common practice of always storing a color data value for a clear color each time a color value is stored for one or more samples of a pixel has limited the degree to which bandwidth requirements can be reduced. It is with respect to these and other considerations that the embodiments described herein are needed.